const cloud = getApp().cloud;
const app = getApp();
Page({
  data: {
    strategy:true
  },

  change(e){
    
    console.log(e);

    this.setData({
      [e.currentTarget.dataset.name]:e.detail.value
    })

    console.log(this.data)

  },

  next(){

    if(this.data.pink && this.data.wenan){
      //调用接口跳转
      cloud.function.invoke('client',{myFlavor:this.data.pink,myDeclaration:this.data.wenan},'setMyCustomInfo').then(res => {
        
        console.log('createPS---填写我的口味和宣言',res);  

        // this.setData({
        //   drawNum:res.data.drawNumWW
        // })
   
        if(res.code == 0){
          my.navigateTo({ url: '../uploadImg/uploadImg' })
        }
      }) 

    }else{
  
      my.navigateTo({ url: '../uploadImg/uploadImg' })

    }
   
    

   

  },

  strategy(){
    this.setData({
      strategy:true
    })
  },

  onClose(){
    this.setData({
      strategy:false
    })
  },

  onLoad() {},
});
